package org.hank.wanandroid.base

import androidx.lifecycle.MutableLiveData
import github.leavesc.reactivehttp.base.BaseReactiveViewModel
import org.hank.wanandroid.bean.ErrInfo
import org.hank.wanandroid.http.SelfRemoteDataSource

open class BaseViewModel : BaseReactiveViewModel() {
    /**
     * 正常来说单个项目中应该只有一个 RemoteDataSource 实现类，即全局使用同一份配置
     * 但父类也应该允许子类使用一个单独的 RemoteDataSource
     */
    var errLive: MutableLiveData<ErrInfo> = MutableLiveData()

    protected open val remoteDataSource by lazy {
        SelfRemoteDataSource(this)
    }

}